import { DefaultLayout, ParentLayout } from '@/layout'
import type { Route } from '@/layout/components'

export default {
  path: '/qingziYan',
  name: 'QingziYan',
  component: DefaultLayout,
  redirect: '/qingziYan/qzyUserManage',
  meta: {
    title: '轻姿颜',
    icon: 'menu-zqy',
    roles: ['轻姿颜'],
    sort: 6,
    alwaysShow: true
  },

  children: [
    {
      path: 'qzyUserManage',
      name: 'QzyUserManage',
      component: () => import('@/views/qingziYan/qzyUserManage'),
      meta: { title: '轻姿颜用户', roles: ['轻姿颜用户'] }
    },
    {
      path: 'qzyGoodsManage',
      name: 'QzyGoodsManage',
      component: ParentLayout,
      redirect: '/qingziYan/qzyGoodsManage/index',
      meta: { title: '轻姿颜商品', roles: ['轻姿颜商品'] },
      children: [
        {
          path: 'combinedProducts',
          name: 'CombinedProducts',
          component: () => import('@/views/qingziYan/qzyGoodsManage/index'),
          meta: { title: '轻姿颜组合商品', roles: ['轻姿颜组合商品'] }
        },
        {
          path: 'qzyGoodsEdit',
          name: 'QzyGoodsEdit',
          component: () =>
            import('@/views/qingziYan/qzyGoodsManage/qzyGoodsEdit'),
          meta: { title: '轻姿颜组合商品编辑', hidden: true }
        },
        {
          path: 'qzyGoodsDetail',
          name: 'QzyGoodsDetail',
          component: () =>
            import('@/views/qingziYan/qzyGoodsManage/qzyGoodsDetail'),
          meta: { title: '轻姿颜组合商品详情', hidden: true }
        }
      ]
    },
    {
      path: 'qzyUserPhoto',
      name: 'QzyUserPhoto',
      component: () => import('@/views/qingziYan/qzyUserManage/qzyUserPhoto'),
      meta: { title: '轻姿颜素材/照片', hidden: true }
    },
    {
      path: 'qzyinventoryLog',
      name: 'QzyInventoryLog',
      component: () =>
        import('@/views/qingziYan/qzyLotteryManage/InventoryLog'),
      meta: { title: '轻姿颜库存日志', hidden: true }
    },
    {
      path: 'qzylotteryRecord',
      name: 'QzyLotteryRecord',
      component: () =>
        import('@/views/qingziYan/qzyLotteryManage/lotteryRecord'),
      meta: { title: '轻姿颜抽奖记录', hidden: true }
    },
    {
      path: 'qzyLotteryDetail',
      name: 'QzyLotteryDetail',
      component: () =>
        import('@/views/qingziYan/qzyLotteryManage/lotteryDetail'),
      meta: { title: '轻姿颜抽奖记录详情', hidden: true }
    },
    {
      path: 'qzyLotteryEdit',
      name: 'QzyLotteryEdit',
      component: () => import('@/views/qingziYan/qzyLotteryManage/lotteryEdit'),
      meta: { title: '抽奖活动编辑', hidden: true }
    },
    {
      path: 'qzyLotteryManage',
      name: 'QzyLotteryManage',
      component: () => import('@/views/qingziYan/qzyLotteryManage'),
      meta: { title: '抽奖活动', roles: ['轻姿颜抽奖活动'] }
    },
    {
      path: 'qzyLotterySetting',
      name: 'QzyLotterySetting',
      component: () => import('@/views/qingziYan/qzyLotterySetting'),
      meta: { title: '抽奖活动配置', roles: ['轻姿颜活动设置'] }
    },
    {
      path: 'qzyRedeemOrder',
      name: 'QzyRedeemOrder',
      component: () => import('@/views/qingziYan/qzyRedeemOrder'),
      meta: { title: '兑换订单', roles: ['轻姿颜兑换订单'] }
    },
    {
      path: 'qzyOrderDetail',
      name: 'QzyOrderDetail',
      component: () => import('@/views/qingziYan/qzyRedeemOrder/orderDetail'),
      meta: { title: '轻姿颜订单详情', hidden: true }
    },
    // {
    //   path: 'qzyCommunityManage',
    //   name: 'qzyCommunityManage',
    //   component: ParentLayout,
    //   redirect: '/qingziYan/qzyCommunityManage/index',
    //   meta: { title: '社区' },
    //   children: [
    //     {
    //       path: 'qzyCommunityManage',
    //       name: 'QzyCommunityManage',
    //       component: () => import('@/views/qingziYan/qzyCommunityManage'),
    //       meta: { title: '社区管理' }
    //     },
    //     {
    //       path: 'qzyCommunityEdit',
    //       name: 'QzyCommunityEdit',
    //       component: () =>
    //         import('@/views/qingziYan/qzyCommunityManage/qzyCommunityEdit'),
    //       meta: { title: '新增社区', hidden: true }
    //     },
    //     {
    //       path: 'qzyClassificationManagement',
    //       name: 'QzyClassificationManagement',
    //       component: () =>
    //         import(
    //           '@/views/qingziYan/qzyCommunityManage/qzyClassificationManagement'
    //         ),
    //       meta: { title: '分类管理' }
    //     }
    //   ]
    // },
    {
      path: 'qzyWeeklyConfiguration',
      name: 'QzyWeeklyConfiguration',
      component: () => import('@/views/qingziYan/qzyWeeklyConfiguration'),
      meta: { title: '周报配置', roles: ['轻姿颜周报配置'] }
    },
    {
      path: 'qzyHomeConfiguration',
      name: 'QzyHomeConfiguration',
      component: () => import('@/views/qingziYan/qzyHomeConfiguration'),
      meta: { title: '首页配置', roles: ['轻姿颜首页配置'] }
    },
    {
      path: 'qzyPosterManage',
      name: 'QzyPosterManage',
      component: () => import('@/views/qingziYan/qzyPosterManage'),
      meta: { title: '海报背景图', roles: ['轻姿颜海报背景图'] }
    }
  ]
} as Route
